package com.demo.steammanagement.mapper;

import com.demo.steammanagement.model.entity.GameAccounts;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
* @author Administrator
* @description 针对表【game_accounts(存储每个游戏的账号信息)】的数据库操作Mapper
* @createDate 2024-12-09 15:45:45
* @Entity com.demo.steammanagement.model.entity.GameAccounts
*/
public interface GameAccountsMapper extends BaseMapper<GameAccounts> {
  /**
   * 根据ID选择游戏账号，并对该行加锁。
   *
   * @param gameAccountId 游戏账号ID
   * @return 加锁后的游戏账号实体
   */
  @Select("SELECT * FROM game_accounts WHERE id = #{id} FOR UPDATE")
  GameAccounts selectByIdWithLock(Long gameAccountId);
}




